package cn.luischen.controller.admin;

import java.io.IOException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import cn.luischen.constant.LogActions;
import cn.luischen.constant.WebConst;
import cn.luischen.controller.BaseController;
import cn.luischen.exception.BusinessException;
import cn.luischen.model.UserDomain;
import cn.luischen.service.log.LogService;
import cn.luischen.service.user.UserService;
import cn.luischen.utils.APIResponse;
import cn.luischen.utils.IPKit;
import cn.luischen.utils.TaleUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import static org.junit.Assert.*;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.*;
import org.junit.Rule;
import org.junit.runner.RunWith;
import org.junit.rules.ExpectedException;
import org.junit.Test;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.modules.junit4.PowerMockRunner;
import org.powermock.reflect.Whitebox;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.mockito.stubbing.Answer;
import java.lang.reflect.Method;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.TypeReference;
import com.alibaba.fastjson.parser.ParserConfig;
import java.util.Map;
import java.util.List;
import com.unitspirit.runtime.*;

/**
 * The class contains tests for the class cn.luischen.controller.admin.AuthController.
 *
 * @generatedBy UnitSpirit CreateTemplateTestFile4
 * @version 1.0.9.11 
 */
@PowerMockIgnore({ "javax.management.*" })
@RunWith(PowerMockRunner.class)
@PrepareForTest({ cn.luischen.utils.APIResponse.class,
		cn.luischen.utils.TaleUtils.class, cn.luischen.utils.IPKit.class })
public class AuthController_toLogin_WGTest {
	@Rule
	public ExpectedException unitspirit_thrown = ExpectedException.none();

	/**
	 * 测试方法初始化.
	 * 
	 * @throws Exception 
	 *         if the initialization fails for some reason 
	 *  
	 * @generatedBy UnitSpirit at 2021-12-08 11:01:11
	 */
	@org.junit.Before
	public void setUp() throws Exception {
		try {
			GlobalUnitInit.init();
			MockitoAnnotations.initMocks(this);
			ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

	@InjectMocks
	cn.luischen.controller.admin.AuthController unitspirit_fixture;

	@Mock
	cn.luischen.service.user.UserService mock_UserService;
	@Mock
	cn.luischen.service.log.LogService mock_LogService;

	/**
	 * @date 2021-12-08 11:01:12
	 * @see cn.luischen.controller.admin.AuthController#toLogin
	 * @category null  
	 * @author UnitSpirit   
	 */
	@Test
	public void test_toLogin_0901_203956_828_2_01() throws Throwable {
		//被测函数参数定义
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito
				.mock(javax.servlet.http.HttpServletResponse.class);
		String String_p_2 = "admin";
		String String_p_3 = "123456";
		String String_p_4 = null;
		//成员变量设置

		//返回值定义 
		String result_expected = "{\"code\":\"fail\",\"msg\":\"\"}";

		PowerMockito.mockStatic(cn.luischen.utils.IPKit.class);
		java.lang.String mock_result_String5 = "\"0:0:0:0:0:0:0:1\"";
		cn.luischen.utils.MapCache mock_sub_caller_MapCache4 = PowerMockito
				.mock(cn.luischen.utils.MapCache.class);
		Object mock_result_Object4 = "1";

		String String_mock3_0 = "admin";
		String String_mock3_1 = "123456";
		cn.luischen.exception.BusinessException sub_UserDomain3 = JSON
				.parseObject(
						"{\"@type\":\"cn.luischen.exception.BusinessException\",\"errorCode\":\"用户名不存在或密码错误\",\"errorMessageArguments\":[]}",
						cn.luischen.exception.BusinessException.class);
		PowerMockito.doThrow(sub_UserDomain3).when(mock_UserService, "login",
				anyString(), anyString());
		String Stringmock2_0 = "login_error_count";
		String Stringmock2_1 = "0:0:0:0:0:0:0:1";
		Object Objectmock2_2 = "2";
		long longmock2_3 = 600L;
		PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
		cn.luischen.utils.APIResponse mock_result_APIResponse1 = JSON
				.parseObject("{\"code\":\"fail\",\"msg\":\"\"}",
						cn.luischen.utils.APIResponse.class);

		PowerMockito.when(
				cn.luischen.utils.IPKit.getIpAddrByRequest(Mockito
						.any(javax.servlet.http.HttpServletRequest.class)))
				.thenReturn(mock_result_String5);
		PowerMockito.when(
				mock_sub_caller_MapCache4.hget(anyString(), anyString()))
				.thenReturn(mock_result_Object4);
		PowerMockito.doNothing().when(mock_sub_caller_MapCache4)
				.hset(anyString(), anyString(), anyObject(), Mockito.anyLong());
		PowerMockito.when(cn.luischen.utils.APIResponse.fail(anyString()))
				.thenReturn(mock_result_APIResponse1);

		cn.luischen.utils.APIResponse unitspirit_result = unitspirit_fixture
				.toLogin(HttpServletRequest_p_0, HttpServletResponse_p_1,
						String_p_2, String_p_3, String_p_4);
		cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(
				result_expected, cn.luischen.utils.APIResponse.class);
		UnitAssert.assertEquals(
				UnitSpiritFastJsonUtil.getJsonString2(obj_expected),
				UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
	}

	/**
	 * @date 2021-12-08 11:01:12
	 * @see cn.luischen.controller.admin.AuthController#toLogin
	 * @category null  
	 * @author UnitSpirit   
	 */
	@Test
	public void test_toLogin_0901_203959_527_1_01() throws Throwable {
		//被测函数参数定义
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito
				.mock(javax.servlet.http.HttpServletResponse.class);
		String String_p_2 = "admin";
		String String_p_3 = "123456";
		String String_p_4 = null;
		//成员变量设置

		//返回值定义 
		String result_expected = "{\"code\":\"fail\",\"msg\":\"您输入密码已经错误超过3次，请10分钟后尝试\"}";

		cn.luischen.utils.APIResponse unitspirit_result = unitspirit_fixture
				.toLogin(HttpServletRequest_p_0, HttpServletResponse_p_1,
						String_p_2, String_p_3, String_p_4);
		cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(
				result_expected, cn.luischen.utils.APIResponse.class);
		UnitAssert.assertEquals(
				UnitSpiritFastJsonUtil.getJsonString2(obj_expected),
				UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
	}

	/**
	 * @date 2021-12-08 11:01:12
	 * @see cn.luischen.controller.admin.AuthController#toLogin
	 * @category null  
	 * @author UnitSpirit   
	 */
	@Test
	public void test_toLogin_0901_203959_527_2_01() throws Throwable {
		//被测函数参数定义
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito
				.mock(javax.servlet.http.HttpServletResponse.class);
		String String_p_2 = "admin";
		String String_p_3 = "123456";
		String String_p_4 = null;
		//成员变量设置

		//返回值定义 
		String result_expected = "{\"code\":\"fail\",\"msg\":\"您输入密码已经错误超过3次，请10分钟后尝试\"}";

		PowerMockito.mockStatic(cn.luischen.utils.IPKit.class);
		java.lang.String mock_result_String4 = "\"0:0:0:0:0:0:0:1\"";
		cn.luischen.utils.MapCache mock_sub_caller_MapCache3 = PowerMockito
				.mock(cn.luischen.utils.MapCache.class);
		Object mock_result_Object3 = "3";

		String String_mock2_0 = "admin";
		String String_mock2_1 = "123456";
		cn.luischen.exception.BusinessException sub_UserDomain2 = JSON
				.parseObject(
						"{\"@type\":\"cn.luischen.exception.BusinessException\",\"errorCode\":\"用户名不存在或密码错误\",\"errorMessageArguments\":[]}",
						cn.luischen.exception.BusinessException.class);
		PowerMockito.doThrow(sub_UserDomain2).when(mock_UserService, "login",
				anyString(), anyString());
		PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
		cn.luischen.utils.APIResponse mock_result_APIResponse1 = JSON
				.parseObject(
						"{\"code\":\"fail\",\"msg\":\"您输入密码已经错误超过3次，请10分钟后尝试\"}",
						cn.luischen.utils.APIResponse.class);

		PowerMockito.when(
				cn.luischen.utils.IPKit.getIpAddrByRequest(Mockito
						.any(javax.servlet.http.HttpServletRequest.class)))
				.thenReturn(mock_result_String4);
		PowerMockito.when(
				mock_sub_caller_MapCache3.hget(anyString(), anyString()))
				.thenReturn(mock_result_Object3);
		PowerMockito.when(cn.luischen.utils.APIResponse.fail(anyString()))
				.thenReturn(mock_result_APIResponse1);

		cn.luischen.utils.APIResponse unitspirit_result = unitspirit_fixture
				.toLogin(HttpServletRequest_p_0, HttpServletResponse_p_1,
						String_p_2, String_p_3, String_p_4);
		cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(
				result_expected, cn.luischen.utils.APIResponse.class);
		UnitAssert.assertEquals(
				UnitSpiritFastJsonUtil.getJsonString2(obj_expected),
				UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
	}

	/**
	 * @date 2021-12-08 11:01:12
	 * @see cn.luischen.controller.admin.AuthController#toLogin
	 * @category null  
	 * @author UnitSpirit   
	 */
	@Test
	public void test_toLogin_0930_081827_061_2_02() throws Throwable {
		//被测函数参数定义
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito
				.mock(javax.servlet.http.HttpServletResponse.class);
		String String_p_2 = "admin";
		String String_p_3 = "123456";
		String String_p_4 = null;
		//成员变量设置

		//返回值定义 
		String result_expected = "{\"code\":\"fail\",\"msg\":\"\"}";

		String mock_result_String5 = "\"125.71.43.132\"";
		cn.luischen.utils.MapCache mock_sub_caller_MapCache4 = PowerMockito
				.mock(cn.luischen.utils.MapCache.class);

		String String_mock3_0 = "admin";
		String String_mock3_1 = "123456";
		cn.luischen.exception.BusinessException sub_UserDomain3 = JSON
				.parseObject(
						"{\"@type\":\"cn.luischen.exception.BusinessException\",\"errorCode\":\"用户名不存在或密码错误\",\"errorMessageArguments\":[]}",
						cn.luischen.exception.BusinessException.class);
		PowerMockito.doThrow(sub_UserDomain3).when(mock_UserService, "login",
				anyString(), anyString());
		String Stringmock2_0 = "login_error_count";
		String Stringmock2_1 = "125.71.43.132";
		Object Objectmock2_2 = "1";
		long longmock2_3 = 600L;
		PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
		cn.luischen.utils.APIResponse mock_result_APIResponse1 = JSON
				.parseObject("{\"code\":\"fail\",\"msg\":\"\"}",
						cn.luischen.utils.APIResponse.class);
		;
		PowerMockito.when(HttpServletRequest_p_0.getRemoteAddr()).thenReturn(
				mock_result_String5);
		PowerMockito.doReturn(null).when(mock_sub_caller_MapCache4, "hget",
				anyString(), anyString());
		PowerMockito.doNothing().when(mock_sub_caller_MapCache4)
				.hset(anyString(), anyString(), anyObject(), Mockito.anyLong());
		PowerMockito.when(cn.luischen.utils.APIResponse.fail(anyString()))
				.thenReturn(mock_result_APIResponse1);

		cn.luischen.utils.APIResponse unitspirit_result = unitspirit_fixture
				.toLogin(HttpServletRequest_p_0, HttpServletResponse_p_1,
						String_p_2, String_p_3, String_p_4);
		cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(
				result_expected, cn.luischen.utils.APIResponse.class);
		UnitAssert.assertEquals(
				UnitSpiritFastJsonUtil.getJsonString2(obj_expected),
				UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
	}

	/**
	 * @date 2021-12-08 11:01:13
	 * @see cn.luischen.controller.admin.AuthController#toLogin
	 * @category null  
	 * @author UnitSpirit   
	 */
	@Test
	public void test_toLogin_0930_081827_061_2_01() throws Throwable {
		//被测函数参数定义
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito
				.mock(javax.servlet.http.HttpServletResponse.class);
		String String_p_2 = "admin";
		String String_p_3 = "123456";
		String String_p_4 = null;
		//成员变量设置

		//返回值定义 
		String result_expected = "{\"code\":\"fail\",\"msg\":\"\"}";

		String mock_result_String5 = "\"125.71.43.132\"";
		cn.luischen.utils.MapCache mock_sub_caller_MapCache4 = PowerMockito
				.mock(cn.luischen.utils.MapCache.class);

		String String_mock3_0 = "admin";
		String String_mock3_1 = "123456";
		cn.luischen.exception.BusinessException sub_UserDomain3 = JSON
				.parseObject(
						"{\"@type\":\"cn.luischen.exception.BusinessException\",\"errorCode\":\"用户名不存在或密码错误\",\"errorMessageArguments\":[]}",
						cn.luischen.exception.BusinessException.class);
		PowerMockito.doThrow(sub_UserDomain3).when(mock_UserService, "login",
				anyString(), anyString());
		String Stringmock2_0 = "login_error_count";
		String Stringmock2_1 = "125.71.43.132";
		Object Objectmock2_2 = "1";
		long longmock2_3 = 600L;
		PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
		cn.luischen.utils.APIResponse mock_result_APIResponse1 = JSON
				.parseObject("{\"code\":\"fail\",\"msg\":\"\"}",
						cn.luischen.utils.APIResponse.class);
		;
		PowerMockito.when(HttpServletRequest_p_0.getRemoteAddr()).thenReturn(
				mock_result_String5);
		PowerMockito.doReturn(null).when(mock_sub_caller_MapCache4, "hget",
				anyString(), anyString());
		PowerMockito.doNothing().when(mock_sub_caller_MapCache4)
				.hset(anyString(), anyString(), anyObject(), Mockito.anyLong());
		PowerMockito.when(cn.luischen.utils.APIResponse.fail(anyString()))
				.thenReturn(mock_result_APIResponse1);

		cn.luischen.utils.APIResponse unitspirit_result = unitspirit_fixture
				.toLogin(HttpServletRequest_p_0, HttpServletResponse_p_1,
						String_p_2, String_p_3, String_p_4);
		cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(
				result_expected, cn.luischen.utils.APIResponse.class);
		UnitAssert.assertEquals(
				UnitSpiritFastJsonUtil.getJsonString2(obj_expected),
				UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
	}

	/**
	 * @date 2021-12-08 11:01:13
	 * @see cn.luischen.controller.admin.AuthController#toLogin
	 * @category null  
	 * @author UnitSpirit   
	 */
	@Test
	public void test_toLogin_0930_081832_941_2_02() throws Throwable {
		//被测函数参数定义
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito
				.mock(javax.servlet.http.HttpServletResponse.class);
		String String_p_2 = "admin";
		String String_p_3 = "123456";
		String String_p_4 = "on";
		//成员变量设置

		//返回值定义 
		String result_expected = "{\"code\":\"fail\",\"msg\":\"\"}";

		String mock_result_String5 = "\"125.71.43.132\"";
		cn.luischen.utils.MapCache mock_sub_caller_MapCache4 = PowerMockito
				.mock(cn.luischen.utils.MapCache.class);
		Object mock_result_Object4 = "1";

		String String_mock3_0 = "admin";
		String String_mock3_1 = "123456";
		cn.luischen.exception.BusinessException sub_UserDomain3 = JSON
				.parseObject(
						"{\"@type\":\"cn.luischen.exception.BusinessException\",\"errorCode\":\"用户名不存在或密码错误\",\"errorMessageArguments\":[]}",
						cn.luischen.exception.BusinessException.class);
		PowerMockito.doThrow(sub_UserDomain3).when(mock_UserService, "login",
				anyString(), anyString());
		String Stringmock2_0 = "login_error_count";
		String Stringmock2_1 = "125.71.43.132";
		Object Objectmock2_2 = "2";
		long longmock2_3 = 600L;
		PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
		cn.luischen.utils.APIResponse mock_result_APIResponse1 = JSON
				.parseObject("{\"code\":\"fail\",\"msg\":\"\"}",
						cn.luischen.utils.APIResponse.class);
		;
		PowerMockito.when(HttpServletRequest_p_0.getRemoteAddr()).thenReturn(
				mock_result_String5);
		PowerMockito.when(
				mock_sub_caller_MapCache4.hget(anyString(), anyString()))
				.thenReturn(mock_result_Object4);
		PowerMockito.doNothing().when(mock_sub_caller_MapCache4)
				.hset(anyString(), anyString(), anyObject(), Mockito.anyLong());
		PowerMockito.when(cn.luischen.utils.APIResponse.fail(anyString()))
				.thenReturn(mock_result_APIResponse1);

		cn.luischen.utils.APIResponse unitspirit_result = unitspirit_fixture
				.toLogin(HttpServletRequest_p_0, HttpServletResponse_p_1,
						String_p_2, String_p_3, String_p_4);
		cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(
				result_expected, cn.luischen.utils.APIResponse.class);
		UnitAssert.assertEquals(
				UnitSpiritFastJsonUtil.getJsonString2(obj_expected),
				UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
	}

	/**
	 * @date 2021-12-08 11:01:13
	 * @see cn.luischen.controller.admin.AuthController#toLogin
	 * @category null  
	 * @author UnitSpirit   
	 */
	@Test
	public void test_toLogin_0930_081832_941_2_01() throws Throwable {
		//被测函数参数定义
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito
				.mock(javax.servlet.http.HttpServletResponse.class);
		String String_p_2 = "admin";
		String String_p_3 = "123456";
		String String_p_4 = "on";
		//成员变量设置

		//返回值定义 
		String result_expected = "{\"code\":\"fail\",\"msg\":\"\"}";

		String mock_result_String5 = "\"125.71.43.132\"";
		cn.luischen.utils.MapCache mock_sub_caller_MapCache4 = PowerMockito
				.mock(cn.luischen.utils.MapCache.class);
		Object mock_result_Object4 = "1";

		String String_mock3_0 = "admin";
		String String_mock3_1 = "123456";
		cn.luischen.exception.BusinessException sub_UserDomain3 = JSON
				.parseObject(
						"{\"@type\":\"cn.luischen.exception.BusinessException\",\"errorCode\":\"用户名不存在或密码错误\",\"errorMessageArguments\":[]}",
						cn.luischen.exception.BusinessException.class);
		PowerMockito.doThrow(sub_UserDomain3).when(mock_UserService, "login",
				anyString(), anyString());
		String Stringmock2_0 = "login_error_count";
		String Stringmock2_1 = "125.71.43.132";
		Object Objectmock2_2 = "2";
		long longmock2_3 = 600L;
		PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
		cn.luischen.utils.APIResponse mock_result_APIResponse1 = JSON
				.parseObject("{\"code\":\"fail\",\"msg\":\"\"}",
						cn.luischen.utils.APIResponse.class);
		;
		PowerMockito.when(HttpServletRequest_p_0.getRemoteAddr()).thenReturn(
				mock_result_String5);
		PowerMockito.when(
				mock_sub_caller_MapCache4.hget(anyString(), anyString()))
				.thenReturn(mock_result_Object4);
		PowerMockito.doNothing().when(mock_sub_caller_MapCache4)
				.hset(anyString(), anyString(), anyObject(), Mockito.anyLong());
		PowerMockito.when(cn.luischen.utils.APIResponse.fail(anyString()))
				.thenReturn(mock_result_APIResponse1);

		cn.luischen.utils.APIResponse unitspirit_result = unitspirit_fixture
				.toLogin(HttpServletRequest_p_0, HttpServletResponse_p_1,
						String_p_2, String_p_3, String_p_4);
		cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(
				result_expected, cn.luischen.utils.APIResponse.class);
		UnitAssert.assertEquals(
				UnitSpiritFastJsonUtil.getJsonString2(obj_expected),
				UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
	}

	/**
	 * @date 2021-12-08 11:01:13
	 * @see cn.luischen.controller.admin.AuthController#toLogin
	 * @category null  
	 * @author UnitSpirit   
	 */
	@Test
	public void test_toLogin_0930_081849_611_2_02() throws Throwable {
		//被测函数参数定义
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito
				.mock(javax.servlet.http.HttpServletResponse.class);
		String String_p_2 = "admin";
		String String_p_3 = "12345678";
		String String_p_4 = "on";
		//成员变量设置

		//返回值定义 
		String result_expected = "{\"code\":\"fail\",\"msg\":\"\"}";

		String mock_result_String5 = "\"125.71.43.132\"";
		cn.luischen.utils.MapCache mock_sub_caller_MapCache4 = PowerMockito
				.mock(cn.luischen.utils.MapCache.class);
		Object mock_result_Object4 = "2";

		String String_mock3_0 = "admin";
		String String_mock3_1 = "12345678";
		cn.luischen.exception.BusinessException sub_UserDomain3 = JSON
				.parseObject(
						"{\"@type\":\"cn.luischen.exception.BusinessException\",\"errorCode\":\"用户名不存在或密码错误\",\"errorMessageArguments\":[]}",
						cn.luischen.exception.BusinessException.class);
		PowerMockito.doThrow(sub_UserDomain3).when(mock_UserService, "login",
				anyString(), anyString());
		String Stringmock2_0 = "login_error_count";
		String Stringmock2_1 = "125.71.43.132";
		Object Objectmock2_2 = "3";
		long longmock2_3 = 600L;
		PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
		cn.luischen.utils.APIResponse mock_result_APIResponse1 = JSON
				.parseObject("{\"code\":\"fail\",\"msg\":\"\"}",
						cn.luischen.utils.APIResponse.class);
		;
		PowerMockito.when(HttpServletRequest_p_0.getRemoteAddr()).thenReturn(
				mock_result_String5);
		PowerMockito.when(
				mock_sub_caller_MapCache4.hget(anyString(), anyString()))
				.thenReturn(mock_result_Object4);
		PowerMockito.doNothing().when(mock_sub_caller_MapCache4)
				.hset(anyString(), anyString(), anyObject(), Mockito.anyLong());
		PowerMockito.when(cn.luischen.utils.APIResponse.fail(anyString()))
				.thenReturn(mock_result_APIResponse1);

		cn.luischen.utils.APIResponse unitspirit_result = unitspirit_fixture
				.toLogin(HttpServletRequest_p_0, HttpServletResponse_p_1,
						String_p_2, String_p_3, String_p_4);
		cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(
				result_expected, cn.luischen.utils.APIResponse.class);
		UnitAssert.assertEquals(
				UnitSpiritFastJsonUtil.getJsonString2(obj_expected),
				UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
	}

	/**
	 * @date 2021-12-08 11:01:13
	 * @see cn.luischen.controller.admin.AuthController#toLogin
	 * @category null  
	 * @author UnitSpirit   
	 */
	@Test
	public void test_toLogin_0930_081849_611_2_01() throws Throwable {
		//被测函数参数定义
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito
				.mock(javax.servlet.http.HttpServletResponse.class);
		String String_p_2 = "admin";
		String String_p_3 = "12345678";
		String String_p_4 = "on";
		//成员变量设置

		//返回值定义 
		String result_expected = "{\"code\":\"fail\",\"msg\":\"\"}";

		String mock_result_String5 = "\"125.71.43.132\"";
		cn.luischen.utils.MapCache mock_sub_caller_MapCache4 = PowerMockito
				.mock(cn.luischen.utils.MapCache.class);
		Object mock_result_Object4 = "2";

		String String_mock3_0 = "admin";
		String String_mock3_1 = "12345678";
		cn.luischen.exception.BusinessException sub_UserDomain3 = JSON
				.parseObject(
						"{\"@type\":\"cn.luischen.exception.BusinessException\",\"errorCode\":\"用户名不存在或密码错误\",\"errorMessageArguments\":[]}",
						cn.luischen.exception.BusinessException.class);
		PowerMockito.doThrow(sub_UserDomain3).when(mock_UserService, "login",
				anyString(), anyString());
		String Stringmock2_0 = "login_error_count";
		String Stringmock2_1 = "125.71.43.132";
		Object Objectmock2_2 = "3";
		long longmock2_3 = 600L;
		PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
		cn.luischen.utils.APIResponse mock_result_APIResponse1 = JSON
				.parseObject("{\"code\":\"fail\",\"msg\":\"\"}",
						cn.luischen.utils.APIResponse.class);
		;
		PowerMockito.when(HttpServletRequest_p_0.getRemoteAddr()).thenReturn(
				mock_result_String5);
		PowerMockito.when(
				mock_sub_caller_MapCache4.hget(anyString(), anyString()))
				.thenReturn(mock_result_Object4);
		PowerMockito.doNothing().when(mock_sub_caller_MapCache4)
				.hset(anyString(), anyString(), anyObject(), Mockito.anyLong());
		PowerMockito.when(cn.luischen.utils.APIResponse.fail(anyString()))
				.thenReturn(mock_result_APIResponse1);

		cn.luischen.utils.APIResponse unitspirit_result = unitspirit_fixture
				.toLogin(HttpServletRequest_p_0, HttpServletResponse_p_1,
						String_p_2, String_p_3, String_p_4);
		cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(
				result_expected, cn.luischen.utils.APIResponse.class);
		UnitAssert.assertEquals(
				UnitSpiritFastJsonUtil.getJsonString2(obj_expected),
				UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
	}

	/**
	 * @date 2021-12-08 11:01:13
	 * @see cn.luischen.controller.admin.AuthController#toLogin
	 * @category null  
	 * @author UnitSpirit   
	 */
	@Test
	public void test_toLogin_0930_083003_987_2_02() throws Throwable {
		//被测函数参数定义
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito
				.mock(javax.servlet.http.HttpServletResponse.class);
		String String_p_2 = "admin";
		String String_p_3 = "123456";
		String String_p_4 = "on";
		//成员变量设置

		//返回值定义 
		String result_expected = "{\"code\":\"fail\",\"msg\":\"\"}";

		String mock_result_String5 = "\"125.71.43.132\"";
		cn.luischen.utils.MapCache mock_sub_caller_MapCache4 = PowerMockito
				.mock(cn.luischen.utils.MapCache.class);

		String String_mock3_0 = "admin";
		String String_mock3_1 = "123456";
		cn.luischen.exception.BusinessException sub_UserDomain3 = JSON
				.parseObject(
						"{\"@type\":\"cn.luischen.exception.BusinessException\",\"errorCode\":\"用户名不存在或密码错误\",\"errorMessageArguments\":[]}",
						cn.luischen.exception.BusinessException.class);
		PowerMockito.doThrow(sub_UserDomain3).when(mock_UserService, "login",
				anyString(), anyString());
		String Stringmock2_0 = "login_error_count";
		String Stringmock2_1 = "125.71.43.132";
		Object Objectmock2_2 = "1";
		long longmock2_3 = 600L;
		PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
		cn.luischen.utils.APIResponse mock_result_APIResponse1 = JSON
				.parseObject("{\"code\":\"fail\",\"msg\":\"\"}",
						cn.luischen.utils.APIResponse.class);
		;
		PowerMockito.when(HttpServletRequest_p_0.getRemoteAddr()).thenReturn(
				mock_result_String5);
		PowerMockito.doReturn(null).when(mock_sub_caller_MapCache4, "hget",
				anyString(), anyString());
		PowerMockito.doNothing().when(mock_sub_caller_MapCache4)
				.hset(anyString(), anyString(), anyObject(), Mockito.anyLong());
		PowerMockito.when(cn.luischen.utils.APIResponse.fail(anyString()))
				.thenReturn(mock_result_APIResponse1);

		cn.luischen.utils.APIResponse unitspirit_result = unitspirit_fixture
				.toLogin(HttpServletRequest_p_0, HttpServletResponse_p_1,
						String_p_2, String_p_3, String_p_4);
		cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(
				result_expected, cn.luischen.utils.APIResponse.class);
		UnitAssert.assertEquals(
				UnitSpiritFastJsonUtil.getJsonString2(obj_expected),
				UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
	}

	/**
	 * @date 2021-12-08 11:01:13
	 * @see cn.luischen.controller.admin.AuthController#toLogin
	 * @category null  
	 * @author UnitSpirit   
	 */
	@Test
	public void test_toLogin_0930_083003_987_2_01() throws Throwable {
		//被测函数参数定义
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito
				.mock(javax.servlet.http.HttpServletResponse.class);
		String String_p_2 = "admin";
		String String_p_3 = "123456";
		String String_p_4 = "on";
		//成员变量设置

		//返回值定义 
		String result_expected = "{\"code\":\"fail\",\"msg\":\"\"}";

		String mock_result_String5 = "\"125.71.43.132\"";
		cn.luischen.utils.MapCache mock_sub_caller_MapCache4 = PowerMockito
				.mock(cn.luischen.utils.MapCache.class);

		String String_mock3_0 = "admin";
		String String_mock3_1 = "123456";
		cn.luischen.exception.BusinessException sub_UserDomain3 = JSON
				.parseObject(
						"{\"@type\":\"cn.luischen.exception.BusinessException\",\"errorCode\":\"用户名不存在或密码错误\",\"errorMessageArguments\":[]}",
						cn.luischen.exception.BusinessException.class);
		PowerMockito.doThrow(sub_UserDomain3).when(mock_UserService, "login",
				anyString(), anyString());
		String Stringmock2_0 = "login_error_count";
		String Stringmock2_1 = "125.71.43.132";
		Object Objectmock2_2 = "1";
		long longmock2_3 = 600L;
		PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
		cn.luischen.utils.APIResponse mock_result_APIResponse1 = JSON
				.parseObject("{\"code\":\"fail\",\"msg\":\"\"}",
						cn.luischen.utils.APIResponse.class);
		;
		PowerMockito.when(HttpServletRequest_p_0.getRemoteAddr()).thenReturn(
				mock_result_String5);
		PowerMockito.doReturn(null).when(mock_sub_caller_MapCache4, "hget",
				anyString(), anyString());
		PowerMockito.doNothing().when(mock_sub_caller_MapCache4)
				.hset(anyString(), anyString(), anyObject(), Mockito.anyLong());
		PowerMockito.when(cn.luischen.utils.APIResponse.fail(anyString()))
				.thenReturn(mock_result_APIResponse1);

		cn.luischen.utils.APIResponse unitspirit_result = unitspirit_fixture
				.toLogin(HttpServletRequest_p_0, HttpServletResponse_p_1,
						String_p_2, String_p_3, String_p_4);
		cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(
				result_expected, cn.luischen.utils.APIResponse.class);
		UnitAssert.assertEquals(
				UnitSpiritFastJsonUtil.getJsonString2(obj_expected),
				UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
	}

	/**
	 * @date 2021-12-08 11:01:13
	 * @see cn.luischen.controller.admin.AuthController#toLogin
	 * @category null  
	 * @author UnitSpirit   
	 */
	@Test
	public void test_toLogin_0930_085525_501_2_02() throws Throwable {
		//被测函数参数定义
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito
				.mock(javax.servlet.http.HttpServletResponse.class);
		String String_p_2 = "admin";
		String String_p_3 = "1234567";
		String String_p_4 = null;
		//成员变量设置

		//返回值定义 
		String result_expected = "{\"code\":\"fail\",\"msg\":\"\"}";

		String mock_result_String5 = "\"125.71.43.132\"";
		cn.luischen.utils.MapCache mock_sub_caller_MapCache4 = PowerMockito
				.mock(cn.luischen.utils.MapCache.class);
		Object mock_result_Object4 = "2";

		String String_mock3_0 = "admin";
		String String_mock3_1 = "1234567";
		cn.luischen.exception.BusinessException sub_UserDomain3 = JSON
				.parseObject(
						"{\"@type\":\"cn.luischen.exception.BusinessException\",\"errorCode\":\"用户名不存在或密码错误\",\"errorMessageArguments\":[]}",
						cn.luischen.exception.BusinessException.class);
		PowerMockito.doThrow(sub_UserDomain3).when(mock_UserService, "login",
				anyString(), anyString());
		String Stringmock2_0 = "login_error_count";
		String Stringmock2_1 = "125.71.43.132";
		Object Objectmock2_2 = "3";
		long longmock2_3 = 600L;
		PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
		cn.luischen.utils.APIResponse mock_result_APIResponse1 = JSON
				.parseObject("{\"code\":\"fail\",\"msg\":\"\"}",
						cn.luischen.utils.APIResponse.class);
		;
		PowerMockito.when(HttpServletRequest_p_0.getRemoteAddr()).thenReturn(
				mock_result_String5);
		PowerMockito.when(
				mock_sub_caller_MapCache4.hget(anyString(), anyString()))
				.thenReturn(mock_result_Object4);
		PowerMockito.doNothing().when(mock_sub_caller_MapCache4)
				.hset(anyString(), anyString(), anyObject(), Mockito.anyLong());
		PowerMockito.when(cn.luischen.utils.APIResponse.fail(anyString()))
				.thenReturn(mock_result_APIResponse1);

		cn.luischen.utils.APIResponse unitspirit_result = unitspirit_fixture
				.toLogin(HttpServletRequest_p_0, HttpServletResponse_p_1,
						String_p_2, String_p_3, String_p_4);
		cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(
				result_expected, cn.luischen.utils.APIResponse.class);
		UnitAssert.assertEquals(
				UnitSpiritFastJsonUtil.getJsonString2(obj_expected),
				UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
	}

	/**
	 * @date 2021-12-08 11:01:13
	 * @see cn.luischen.controller.admin.AuthController#toLogin
	 * @category null  
	 * @author UnitSpirit   
	 */
	@Test
	public void test_toLogin_0930_085525_501_2_01() throws Throwable {
		//被测函数参数定义
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito
				.mock(javax.servlet.http.HttpServletResponse.class);
		String String_p_2 = "admin";
		String String_p_3 = "1234567";
		String String_p_4 = null;
		//成员变量设置

		//返回值定义 
		String result_expected = "{\"code\":\"fail\",\"msg\":\"\"}";

		String mock_result_String5 = "\"125.71.43.132\"";
		cn.luischen.utils.MapCache mock_sub_caller_MapCache4 = PowerMockito
				.mock(cn.luischen.utils.MapCache.class);
		Object mock_result_Object4 = "2";

		String String_mock3_0 = "admin";
		String String_mock3_1 = "1234567";
		cn.luischen.exception.BusinessException sub_UserDomain3 = JSON
				.parseObject(
						"{\"@type\":\"cn.luischen.exception.BusinessException\",\"errorCode\":\"用户名不存在或密码错误\",\"errorMessageArguments\":[]}",
						cn.luischen.exception.BusinessException.class);
		PowerMockito.doThrow(sub_UserDomain3).when(mock_UserService, "login",
				anyString(), anyString());
		String Stringmock2_0 = "login_error_count";
		String Stringmock2_1 = "125.71.43.132";
		Object Objectmock2_2 = "3";
		long longmock2_3 = 600L;
		PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
		cn.luischen.utils.APIResponse mock_result_APIResponse1 = JSON
				.parseObject("{\"code\":\"fail\",\"msg\":\"\"}",
						cn.luischen.utils.APIResponse.class);
		;
		PowerMockito.when(HttpServletRequest_p_0.getRemoteAddr()).thenReturn(
				mock_result_String5);
		PowerMockito.when(
				mock_sub_caller_MapCache4.hget(anyString(), anyString()))
				.thenReturn(mock_result_Object4);
		PowerMockito.doNothing().when(mock_sub_caller_MapCache4)
				.hset(anyString(), anyString(), anyObject(), Mockito.anyLong());
		PowerMockito.when(cn.luischen.utils.APIResponse.fail(anyString()))
				.thenReturn(mock_result_APIResponse1);

		cn.luischen.utils.APIResponse unitspirit_result = unitspirit_fixture
				.toLogin(HttpServletRequest_p_0, HttpServletResponse_p_1,
						String_p_2, String_p_3, String_p_4);
		cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(
				result_expected, cn.luischen.utils.APIResponse.class);
		UnitAssert.assertEquals(
				UnitSpiritFastJsonUtil.getJsonString2(obj_expected),
				UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
	}

	/**
	 * @date 2021-12-08 11:01:13
	 * @see cn.luischen.controller.admin.AuthController#toLogin
	 * @category null  
	 * @author UnitSpirit   
	 */
	@Test
	public void test_toLogin_0930_085530_928_2_02() throws Throwable {
		//被测函数参数定义
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito
				.mock(javax.servlet.http.HttpServletResponse.class);
		String String_p_2 = "admin";
		String String_p_3 = "123456";
		String String_p_4 = null;
		//成员变量设置

		//返回值定义 
		String result_expected = "{\"code\":\"fail\",\"msg\":\"您输入密码已经错误超过3次，请10分钟后尝试\"}";

		String mock_result_String4 = "\"125.71.43.132\"";
		cn.luischen.utils.MapCache mock_sub_caller_MapCache3 = PowerMockito
				.mock(cn.luischen.utils.MapCache.class);
		Object mock_result_Object3 = "3";

		String String_mock2_0 = "admin";
		String String_mock2_1 = "123456";
		cn.luischen.exception.BusinessException sub_UserDomain2 = JSON
				.parseObject(
						"{\"@type\":\"cn.luischen.exception.BusinessException\",\"errorCode\":\"用户名不存在或密码错误\",\"errorMessageArguments\":[]}",
						cn.luischen.exception.BusinessException.class);
		PowerMockito.doThrow(sub_UserDomain2).when(mock_UserService, "login",
				anyString(), anyString());
		PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
		cn.luischen.utils.APIResponse mock_result_APIResponse1 = JSON
				.parseObject(
						"{\"code\":\"fail\",\"msg\":\"您输入密码已经错误超过3次，请10分钟后尝试\"}",
						cn.luischen.utils.APIResponse.class);
		;
		PowerMockito.when(HttpServletRequest_p_0.getRemoteAddr()).thenReturn(
				mock_result_String4);
		PowerMockito.when(
				mock_sub_caller_MapCache3.hget(anyString(), anyString()))
				.thenReturn(mock_result_Object3);
		PowerMockito.when(cn.luischen.utils.APIResponse.fail(anyString()))
				.thenReturn(mock_result_APIResponse1);

		cn.luischen.utils.APIResponse unitspirit_result = unitspirit_fixture
				.toLogin(HttpServletRequest_p_0, HttpServletResponse_p_1,
						String_p_2, String_p_3, String_p_4);
		cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(
				result_expected, cn.luischen.utils.APIResponse.class);
		UnitAssert.assertEquals(
				UnitSpiritFastJsonUtil.getJsonString2(obj_expected),
				UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
	}

	/**
	 * @date 2021-12-08 11:01:13
	 * @see cn.luischen.controller.admin.AuthController#toLogin
	 * @category null  
	 * @author UnitSpirit   
	 */
	@Test
	public void test_toLogin_0930_085530_928_2_01() throws Throwable {
		//被测函数参数定义
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito
				.mock(javax.servlet.http.HttpServletResponse.class);
		String String_p_2 = "admin";
		String String_p_3 = "123456";
		String String_p_4 = null;
		//成员变量设置

		//返回值定义 
		String result_expected = "{\"code\":\"fail\",\"msg\":\"您输入密码已经错误超过3次，请10分钟后尝试\"}";

		String mock_result_String4 = "\"125.71.43.132\"";
		cn.luischen.utils.MapCache mock_sub_caller_MapCache3 = PowerMockito
				.mock(cn.luischen.utils.MapCache.class);
		Object mock_result_Object3 = "3";

		String String_mock2_0 = "admin";
		String String_mock2_1 = "123456";
		cn.luischen.exception.BusinessException sub_UserDomain2 = JSON
				.parseObject(
						"{\"@type\":\"cn.luischen.exception.BusinessException\",\"errorCode\":\"用户名不存在或密码错误\",\"errorMessageArguments\":[]}",
						cn.luischen.exception.BusinessException.class);
		PowerMockito.doThrow(sub_UserDomain2).when(mock_UserService, "login",
				anyString(), anyString());
		PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
		cn.luischen.utils.APIResponse mock_result_APIResponse1 = JSON
				.parseObject(
						"{\"code\":\"fail\",\"msg\":\"您输入密码已经错误超过3次，请10分钟后尝试\"}",
						cn.luischen.utils.APIResponse.class);
		;
		PowerMockito.when(HttpServletRequest_p_0.getRemoteAddr()).thenReturn(
				mock_result_String4);
		PowerMockito.when(
				mock_sub_caller_MapCache3.hget(anyString(), anyString()))
				.thenReturn(mock_result_Object3);
		PowerMockito.when(cn.luischen.utils.APIResponse.fail(anyString()))
				.thenReturn(mock_result_APIResponse1);

		cn.luischen.utils.APIResponse unitspirit_result = unitspirit_fixture
				.toLogin(HttpServletRequest_p_0, HttpServletResponse_p_1,
						String_p_2, String_p_3, String_p_4);
		cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(
				result_expected, cn.luischen.utils.APIResponse.class);
		UnitAssert.assertEquals(
				UnitSpiritFastJsonUtil.getJsonString2(obj_expected),
				UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
	}

	/**
	 * @date 2021-12-08 11:01:13
	 * @see cn.luischen.controller.admin.AuthController#toLogin
	 * @category null  
	 * @author UnitSpirit   
	 */
	@Test
	public void test_toLogin_0930_100641_211_2_02() throws Throwable {
		//被测函数参数定义
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito
				.mock(javax.servlet.http.HttpServletResponse.class);
		String String_p_2 = "admin";
		String String_p_3 = "123456";
		String String_p_4 = null;
		//成员变量设置

		//返回值定义 
		String result_expected = "{\"code\":\"success\"}";

		String mock_result_String8 = "\"125.71.43.132\"";
		String mock_result_String4 = "\"125.71.43.132\"";
		cn.luischen.utils.MapCache mock_sub_caller_MapCache7 = PowerMockito
				.mock(cn.luischen.utils.MapCache.class);
		cn.luischen.model.UserDomain mock_result_UserDomain6 = JSON
				.parseObject(
						"{\"activated\":0,\"created\":1490756162,\"email\":\"1034683568@qq.com\",\"groupName\":\"visitor\",\"logged\":0,\"password\":\"a66abb5684c45962d887564f08346e8d\",\"screenName\":\"admin\",\"uid\":1,\"username\":\"admin\"}",
						cn.luischen.model.UserDomain.class);
		javax.servlet.http.HttpSession mock_result_HttpSession5 = PowerMockito
				.mock(javax.servlet.http.HttpSession.class);
		cn.luischen.model.UserDomain mock_sub_caller_UserDomain3 = PowerMockito
				.mock(cn.luischen.model.UserDomain.class);
		Integer mock_result_Integer3 = 1;
		String Stringmock2_0 = "登录后台";
		String Stringmock2_1 = null;
		String Stringmock2_2 = "125.71.43.132";
		Integer Integermock2_3 = 1;
		PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
		cn.luischen.utils.APIResponse mock_result_APIResponse1 = JSON
				.parseObject("{\"code\":\"success\"}",
						cn.luischen.utils.APIResponse.class);
		;
		PowerMockito.when(HttpServletRequest_p_0.getRemoteAddr())
				.thenReturn(mock_result_String8)
				.thenReturn(mock_result_String4);
		PowerMockito.doReturn(null).when(mock_sub_caller_MapCache7, "hget",
				anyString(), anyString());
		PowerMockito.when(mock_UserService.login(anyString(), anyString()))
				.thenReturn(mock_result_UserDomain6);
		PowerMockito.when(HttpServletRequest_p_0.getSession(anyBoolean()))
				.thenReturn(mock_result_HttpSession5);
		PowerMockito.when(mock_sub_caller_UserDomain3.getUid()).thenReturn(
				mock_result_Integer3);
		PowerMockito
				.doNothing()
				.when(mock_LogService)
				.addLog(anyString(), Mockito.any(), anyString(),
						Mockito.anyInt());
		PowerMockito.when(cn.luischen.utils.APIResponse.success()).thenReturn(
				mock_result_APIResponse1);

		cn.luischen.utils.APIResponse unitspirit_result = unitspirit_fixture
				.toLogin(HttpServletRequest_p_0, HttpServletResponse_p_1,
						String_p_2, String_p_3, String_p_4);
		cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(
				result_expected, cn.luischen.utils.APIResponse.class);
		UnitAssert.assertEquals(
				UnitSpiritFastJsonUtil.getJsonString2(obj_expected),
				UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
	}

	/**
	 * @date 2021-12-08 11:01:13
	 * @see cn.luischen.controller.admin.AuthController#toLogin
	 * @category null  
	 * @author UnitSpirit   
	 */
	@Test
	public void test_toLogin_0930_100641_211_2_01() throws Throwable {
		//被测函数参数定义
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito
				.mock(javax.servlet.http.HttpServletResponse.class);
		String String_p_2 = "admin";
		String String_p_3 = "123456";
		String String_p_4 = null;
		//成员变量设置

		//返回值定义 
		String result_expected = "{\"code\":\"success\"}";

		String mock_result_String8 = "\"125.71.43.132\"";
		String mock_result_String4 = "\"125.71.43.132\"";
		cn.luischen.utils.MapCache mock_sub_caller_MapCache7 = PowerMockito
				.mock(cn.luischen.utils.MapCache.class);
		cn.luischen.model.UserDomain mock_result_UserDomain6 = JSON
				.parseObject(
						"{\"activated\":0,\"created\":1490756162,\"email\":\"1034683568@qq.com\",\"groupName\":\"visitor\",\"logged\":0,\"password\":\"a66abb5684c45962d887564f08346e8d\",\"screenName\":\"admin\",\"uid\":1,\"username\":\"admin\"}",
						cn.luischen.model.UserDomain.class);
		javax.servlet.http.HttpSession mock_result_HttpSession5 = PowerMockito
				.mock(javax.servlet.http.HttpSession.class);
		cn.luischen.model.UserDomain mock_sub_caller_UserDomain3 = PowerMockito
				.mock(cn.luischen.model.UserDomain.class);
		Integer mock_result_Integer3 = 1;
		String Stringmock2_0 = "登录后台";
		String Stringmock2_1 = null;
		String Stringmock2_2 = "125.71.43.132";
		Integer Integermock2_3 = 1;
		PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
		cn.luischen.utils.APIResponse mock_result_APIResponse1 = JSON
				.parseObject("{\"code\":\"success\"}",
						cn.luischen.utils.APIResponse.class);
		;
		PowerMockito.when(HttpServletRequest_p_0.getRemoteAddr())
				.thenReturn(mock_result_String8)
				.thenReturn(mock_result_String4);
		PowerMockito.doReturn(null).when(mock_sub_caller_MapCache7, "hget",
				anyString(), anyString());
		PowerMockito.when(mock_UserService.login(anyString(), anyString()))
				.thenReturn(mock_result_UserDomain6);
		PowerMockito.when(HttpServletRequest_p_0.getSession(anyBoolean()))
				.thenReturn(mock_result_HttpSession5);
		PowerMockito.when(mock_sub_caller_UserDomain3.getUid()).thenReturn(
				mock_result_Integer3);
		PowerMockito
				.doNothing()
				.when(mock_LogService)
				.addLog(anyString(), Mockito.any(), anyString(),
						Mockito.anyInt());
		PowerMockito.when(cn.luischen.utils.APIResponse.success()).thenReturn(
				mock_result_APIResponse1);

		cn.luischen.utils.APIResponse unitspirit_result = unitspirit_fixture
				.toLogin(HttpServletRequest_p_0, HttpServletResponse_p_1,
						String_p_2, String_p_3, String_p_4);
		cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(
				result_expected, cn.luischen.utils.APIResponse.class);
		UnitAssert.assertEquals(
				UnitSpiritFastJsonUtil.getJsonString2(obj_expected),
				UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
	}

	/**
	 * @date 2021-12-08 11:01:13
	 * @see cn.luischen.controller.admin.AuthController#toLogin
	 * @category null  
	 * @author UnitSpirit   
	 */
	@Test
	public void test_toLogin_0930_101012_428_2_02() throws Throwable {
		//被测函数参数定义
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito
				.mock(javax.servlet.http.HttpServletResponse.class);
		String String_p_2 = "admin";
		String String_p_3 = "123456";
		String String_p_4 = null;
		//成员变量设置

		//返回值定义 
		String result_expected = "{\"code\":\"success\"}";

		String mock_result_String8 = "\"58.33.30.146\"";
		String mock_result_String4 = "\"58.33.30.146\"";
		cn.luischen.utils.MapCache mock_sub_caller_MapCache7 = PowerMockito
				.mock(cn.luischen.utils.MapCache.class);
		cn.luischen.model.UserDomain mock_result_UserDomain6 = JSON
				.parseObject(
						"{\"activated\":0,\"created\":1490756162,\"email\":\"1034683568@qq.com\",\"groupName\":\"visitor\",\"logged\":0,\"password\":\"a66abb5684c45962d887564f08346e8d\",\"screenName\":\"admin\",\"uid\":1,\"username\":\"admin\"}",
						cn.luischen.model.UserDomain.class);
		javax.servlet.http.HttpSession mock_result_HttpSession5 = PowerMockito
				.mock(javax.servlet.http.HttpSession.class);
		cn.luischen.model.UserDomain mock_sub_caller_UserDomain3 = PowerMockito
				.mock(cn.luischen.model.UserDomain.class);
		Integer mock_result_Integer3 = 1;
		String Stringmock2_0 = "登录后台";
		String Stringmock2_1 = null;
		String Stringmock2_2 = "58.33.30.146";
		Integer Integermock2_3 = 1;
		PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
		cn.luischen.utils.APIResponse mock_result_APIResponse1 = JSON
				.parseObject("{\"code\":\"success\"}",
						cn.luischen.utils.APIResponse.class);
		;
		PowerMockito.when(HttpServletRequest_p_0.getRemoteAddr())
				.thenReturn(mock_result_String8)
				.thenReturn(mock_result_String4);
		PowerMockito.doReturn(null).when(mock_sub_caller_MapCache7, "hget",
				anyString(), anyString());
		PowerMockito.when(mock_UserService.login(anyString(), anyString()))
				.thenReturn(mock_result_UserDomain6);
		PowerMockito.when(HttpServletRequest_p_0.getSession(anyBoolean()))
				.thenReturn(mock_result_HttpSession5);
		PowerMockito.when(mock_sub_caller_UserDomain3.getUid()).thenReturn(
				mock_result_Integer3);
		PowerMockito
				.doNothing()
				.when(mock_LogService)
				.addLog(anyString(), Mockito.any(), anyString(),
						Mockito.anyInt());
		PowerMockito.when(cn.luischen.utils.APIResponse.success()).thenReturn(
				mock_result_APIResponse1);

		cn.luischen.utils.APIResponse unitspirit_result = unitspirit_fixture
				.toLogin(HttpServletRequest_p_0, HttpServletResponse_p_1,
						String_p_2, String_p_3, String_p_4);
		cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(
				result_expected, cn.luischen.utils.APIResponse.class);
		UnitAssert.assertEquals(
				UnitSpiritFastJsonUtil.getJsonString2(obj_expected),
				UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
	}

	/**
	 * @date 2021-12-08 11:01:13
	 * @see cn.luischen.controller.admin.AuthController#toLogin
	 * @category null  
	 * @author UnitSpirit   
	 */
	@Test
	public void test_toLogin_0930_101012_428_2_01() throws Throwable {
		//被测函数参数定义
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito
				.mock(javax.servlet.http.HttpServletResponse.class);
		String String_p_2 = "admin";
		String String_p_3 = "123456";
		String String_p_4 = null;
		//成员变量设置

		//返回值定义 
		String result_expected = "{\"code\":\"success\"}";

		String mock_result_String8 = "\"58.33.30.146\"";
		String mock_result_String4 = "\"58.33.30.146\"";
		cn.luischen.utils.MapCache mock_sub_caller_MapCache7 = PowerMockito
				.mock(cn.luischen.utils.MapCache.class);
		cn.luischen.model.UserDomain mock_result_UserDomain6 = JSON
				.parseObject(
						"{\"activated\":0,\"created\":1490756162,\"email\":\"1034683568@qq.com\",\"groupName\":\"visitor\",\"logged\":0,\"password\":\"a66abb5684c45962d887564f08346e8d\",\"screenName\":\"admin\",\"uid\":1,\"username\":\"admin\"}",
						cn.luischen.model.UserDomain.class);
		javax.servlet.http.HttpSession mock_result_HttpSession5 = PowerMockito
				.mock(javax.servlet.http.HttpSession.class);
		cn.luischen.model.UserDomain mock_sub_caller_UserDomain3 = PowerMockito
				.mock(cn.luischen.model.UserDomain.class);
		Integer mock_result_Integer3 = 1;
		String Stringmock2_0 = "登录后台";
		String Stringmock2_1 = null;
		String Stringmock2_2 = "58.33.30.146";
		Integer Integermock2_3 = 1;
		PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
		cn.luischen.utils.APIResponse mock_result_APIResponse1 = JSON
				.parseObject("{\"code\":\"success\"}",
						cn.luischen.utils.APIResponse.class);
		;
		PowerMockito.when(HttpServletRequest_p_0.getRemoteAddr())
				.thenReturn(mock_result_String8)
				.thenReturn(mock_result_String4);
		PowerMockito.doReturn(null).when(mock_sub_caller_MapCache7, "hget",
				anyString(), anyString());
		PowerMockito.when(mock_UserService.login(anyString(), anyString()))
				.thenReturn(mock_result_UserDomain6);
		PowerMockito.when(HttpServletRequest_p_0.getSession(anyBoolean()))
				.thenReturn(mock_result_HttpSession5);
		PowerMockito.when(mock_sub_caller_UserDomain3.getUid()).thenReturn(
				mock_result_Integer3);
		PowerMockito
				.doNothing()
				.when(mock_LogService)
				.addLog(anyString(), Mockito.any(), anyString(),
						Mockito.anyInt());
		PowerMockito.when(cn.luischen.utils.APIResponse.success()).thenReturn(
				mock_result_APIResponse1);

		cn.luischen.utils.APIResponse unitspirit_result = unitspirit_fixture
				.toLogin(HttpServletRequest_p_0, HttpServletResponse_p_1,
						String_p_2, String_p_3, String_p_4);
		cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(
				result_expected, cn.luischen.utils.APIResponse.class);
		UnitAssert.assertEquals(
				UnitSpiritFastJsonUtil.getJsonString2(obj_expected),
				UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
	}

	/**
	 * @date 2021-12-08 11:01:13
	 * @see cn.luischen.controller.admin.AuthController#toLogin
	 * @category null  
	 * @author UnitSpirit   
	 */
	@Test
	public void test_toLogin_1001_002740_728_2_02() throws Throwable {
		//被测函数参数定义
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito
				.mock(javax.servlet.http.HttpServletResponse.class);
		String String_p_2 = "admin";
		String String_p_3 = "123456";
		String String_p_4 = "on";
		//成员变量设置

		//返回值定义 
		String result_expected = "{\"code\":\"success\"}";

		String mock_result_String10 = "\"125.71.43.132\"";
		String mock_result_String4 = "\"125.71.43.132\"";
		cn.luischen.utils.MapCache mock_sub_caller_MapCache9 = PowerMockito
				.mock(cn.luischen.utils.MapCache.class);
		cn.luischen.model.UserDomain mock_result_UserDomain8 = JSON
				.parseObject(
						"{\"activated\":0,\"created\":1490756162,\"email\":\"1034683568@qq.com\",\"groupName\":\"visitor\",\"logged\":0,\"password\":\"a66abb5684c45962d887564f08346e8d\",\"screenName\":\"admin\",\"uid\":1,\"username\":\"admin\"}",
						cn.luischen.model.UserDomain.class);
		javax.servlet.http.HttpSession mock_result_HttpSession7 = PowerMockito
				.mock(javax.servlet.http.HttpSession.class);
		cn.luischen.model.UserDomain mock_sub_caller_UserDomain6 = PowerMockito
				.mock(cn.luischen.model.UserDomain.class);
		Integer mock_result_Integer6 = 1;
		Integer mock_result_Integer3 = 1;
		PowerMockito.mockStatic(cn.luischen.utils.TaleUtils.class);

		javax.servlet.http.HttpServletResponse HttpServletResponsemock5_0 = Mockito
				.mock(javax.servlet.http.HttpServletResponse.class);
		Integer Integermock5_1 = 1;
		String Stringmock2_0 = "登录后台";
		String Stringmock2_1 = null;
		String Stringmock2_2 = "125.71.43.132";
		Integer Integermock2_3 = 1;
		PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
		cn.luischen.utils.APIResponse mock_result_APIResponse1 = JSON
				.parseObject("{\"code\":\"success\"}",
						cn.luischen.utils.APIResponse.class);
		;
		PowerMockito.when(HttpServletRequest_p_0.getRemoteAddr())
				.thenReturn(mock_result_String10)
				.thenReturn(mock_result_String4);
		PowerMockito.doReturn(null).when(mock_sub_caller_MapCache9, "hget",
				anyString(), anyString());
		PowerMockito.when(mock_UserService.login(anyString(), anyString()))
				.thenReturn(mock_result_UserDomain8);
		PowerMockito.when(HttpServletRequest_p_0.getSession(anyBoolean()))
				.thenReturn(mock_result_HttpSession7);
		PowerMockito.when(mock_sub_caller_UserDomain6.getUid())
				.thenReturn(mock_result_Integer6)
				.thenReturn(mock_result_Integer3);
		PowerMockito.doNothing().when(TaleUtils.class, "setCookie",
				Mockito.any(javax.servlet.http.HttpServletResponse.class),
				Mockito.anyInt());
		PowerMockito
				.doNothing()
				.when(mock_LogService)
				.addLog(anyString(), Mockito.any(), anyString(),
						Mockito.anyInt());
		PowerMockito.when(cn.luischen.utils.APIResponse.success()).thenReturn(
				mock_result_APIResponse1);

		cn.luischen.utils.APIResponse unitspirit_result = unitspirit_fixture
				.toLogin(HttpServletRequest_p_0, HttpServletResponse_p_1,
						String_p_2, String_p_3, String_p_4);
		cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(
				result_expected, cn.luischen.utils.APIResponse.class);
		UnitAssert.assertEquals(
				UnitSpiritFastJsonUtil.getJsonString2(obj_expected),
				UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
	}
  /**
  * @date 2021-12-08 11:01:13
  * @see cn.luischen.controller.admin.AuthController#toLogin
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_toLogin_1001_002740_728_2_01() throws Throwable {
    //被测函数参数定义
    javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito.mock(javax.servlet.http.HttpServletRequest.class);
    javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito.mock(javax.servlet.http.HttpServletResponse.class);
    String String_p_2 = "admin";
    String String_p_3 = "123456";
    String String_p_4 = "on";
  //成员变量设置


    //返回值定义 
    String result_expected = "{\"code\":\"success\"}";

    String mock_result_String10 = "\"125.71.43.132\"";
    String mock_result_String4 = "\"125.71.43.132\"";  cn.luischen.utils.MapCache  mock_sub_caller_MapCache9 = PowerMockito.mock(cn.luischen.utils.MapCache.class);
    cn.luischen.model.UserDomain mock_result_UserDomain8 =  JSON.parseObject("{\"activated\":0,\"created\":1490756162,\"email\":\"1034683568@qq.com\",\"groupName\":\"visitor\",\"logged\":0,\"password\":\"a66abb5684c45962d887564f08346e8d\",\"screenName\":\"admin\",\"uid\":1,\"username\":\"admin\"}",cn.luischen.model.UserDomain.class);
    javax.servlet.http.HttpSession mock_result_HttpSession7 =  PowerMockito.mock(javax.servlet.http.HttpSession.class);  cn.luischen.model.UserDomain  mock_sub_caller_UserDomain6 = PowerMockito.mock(cn.luischen.model.UserDomain.class);
    Integer mock_result_Integer6 = 1;
    Integer mock_result_Integer3 = 1;
    PowerMockito.mockStatic(cn.luischen.utils.TaleUtils.class);
  
    javax.servlet.http.HttpServletResponse HttpServletResponsemock5_0 = Mockito.mock(javax.servlet.http.HttpServletResponse.class);
    Integer Integermock5_1 = 1;
    String Stringmock2_0 = "登录后台";
    String Stringmock2_1 = null;
    String Stringmock2_2 = "125.71.43.132";
    Integer Integermock2_3 = 1;
    PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
    cn.luischen.utils.APIResponse mock_result_APIResponse1 =  JSON.parseObject("{\"code\":\"success\"}",cn.luischen.utils.APIResponse.class);
;
    PowerMockito.when(HttpServletRequest_p_0.getRemoteAddr()).thenReturn( mock_result_String10).thenReturn( mock_result_String4);
    PowerMockito.doReturn(null).when( mock_sub_caller_MapCache9,"hget",anyString(),anyString());
    PowerMockito.when(mock_UserService.login(anyString(),anyString())).thenReturn( mock_result_UserDomain8);
    PowerMockito.when(HttpServletRequest_p_0.getSession(anyBoolean())).thenReturn( mock_result_HttpSession7);
    PowerMockito.when( mock_sub_caller_UserDomain6.getUid()).thenReturn( mock_result_Integer6).thenReturn( mock_result_Integer3);
    PowerMockito.doNothing().when(TaleUtils.class,"setCookie",Mockito.any(javax.servlet.http.HttpServletResponse.class ),Mockito.anyInt());
    PowerMockito.doNothing().when(mock_LogService).addLog(anyString(),Mockito.any(),anyString(),Mockito.anyInt());
    PowerMockito.when(cn.luischen.utils.APIResponse.success()).thenReturn( mock_result_APIResponse1);

    cn.luischen.utils.APIResponse  unitspirit_result =  unitspirit_fixture.toLogin(HttpServletRequest_p_0,HttpServletResponse_p_1,String_p_2,String_p_3,String_p_4);
    cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(result_expected,cn.luischen.utils.APIResponse.class);
    UnitAssert.assertEquals(UnitSpiritFastJsonUtil.getJsonString2(obj_expected),UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
  }
  /**
  * @date 2021-12-08 11:01:13
  * @see cn.luischen.controller.admin.AuthController#toLogin
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_toLogin_1207_112008_625_2_01() throws Throwable {
    //被测函数参数定义
    javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito.mock(javax.servlet.http.HttpServletRequest.class);
    javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito.mock(javax.servlet.http.HttpServletResponse.class);
    String String_p_2 = "admin";
    String String_p_3 = "123456";
    String String_p_4 = null;
  //成员变量设置


    //返回值定义 
    String result_expected = "{\"code\":\"success\"}";

    PowerMockito.mockStatic(cn.luischen.utils.IPKit.class);
    java.lang.String mock_result_String9 = "\"127.0.0.1\"";  cn.luischen.utils.MapCache  mock_sub_caller_MapCache8 = PowerMockito.mock(cn.luischen.utils.MapCache.class);
    cn.luischen.model.UserDomain mock_result_UserDomain7 =  JSON.parseObject("{\"activated\":0,\"created\":1490756162,\"email\":\"1034683568@qq.com\",\"groupName\":\"visitor\",\"logged\":0,\"password\":\"a66abb5684c45962d887564f08346e8d\",\"screenName\":\"admin\",\"uid\":1,\"username\":\"admin\"}",cn.luischen.model.UserDomain.class);  javax.servlet.http.HttpSession  mock_sub_caller_HttpSession4 = PowerMockito.mock(javax.servlet.http.HttpSession.class);
    String Stringmock4_0 = "login_user";
    Object Objectmock4_1 = "{\"uid\":1,\"groupName\":\"visitor\",\"password\":\"a66abb5684c45962d887564f08346e8d\",\"logged\":0,\"created\":1490756162,\"screenName\":\"admin\",\"email\":\"1034683568@qq.com\",\"activated\":0,\"username\":\"admin\"}";  cn.luischen.model.UserDomain  mock_sub_caller_UserDomain3 = PowerMockito.mock(cn.luischen.model.UserDomain.class);
    Integer mock_result_Integer3 = 1;
    String Stringmock2_0 = "登录后台";
    String Stringmock2_1 = null;
    String Stringmock2_2 = "127.0.0.1";
    Integer Integermock2_3 = 1;
    PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
    cn.luischen.utils.APIResponse mock_result_APIResponse1 =  JSON.parseObject("{\"code\":\"success\"}",cn.luischen.utils.APIResponse.class);

    PowerMockito.when(cn.luischen.utils.IPKit.getIpAddrByRequest(Mockito.any(javax.servlet.http.HttpServletRequest.class ))).thenReturn( mock_result_String9);
    PowerMockito.doReturn(null).when( mock_sub_caller_MapCache8,"hget",anyString(),anyString());
    PowerMockito.when(mock_UserService.login(anyString(),anyString())).thenReturn( mock_result_UserDomain7);
    PowerMockito.doNothing().when( mock_sub_caller_HttpSession4).setAttribute(anyString(),anyObject());
    PowerMockito.when( mock_sub_caller_UserDomain3.getUid()).thenReturn( mock_result_Integer3);
    PowerMockito.doNothing().when(mock_LogService).addLog(anyString(),Mockito.any(),anyString(),Mockito.anyInt());
    PowerMockito.when(cn.luischen.utils.APIResponse.success()).thenReturn( mock_result_APIResponse1);

    cn.luischen.utils.APIResponse  unitspirit_result =  unitspirit_fixture.toLogin(HttpServletRequest_p_0,HttpServletResponse_p_1,String_p_2,String_p_3,String_p_4);
    cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(result_expected,cn.luischen.utils.APIResponse.class);
    UnitAssert.assertEquals(UnitSpiritFastJsonUtil.getJsonString2(obj_expected),UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
  }
  /**
  * @date 2021-12-08 11:01:14
  * @see cn.luischen.controller.admin.AuthController#toLogin
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_toLogin_1207_113816_530_2_01() throws Throwable {
    //被测函数参数定义
    javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito.mock(javax.servlet.http.HttpServletRequest.class);
    javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito.mock(javax.servlet.http.HttpServletResponse.class);
    String String_p_2 = "admin";
    String String_p_3 = "123456";
    String String_p_4 = null;
  //成员变量设置


    //返回值定义 
    String result_expected = "{\"code\":\"success\"}";

    PowerMockito.mockStatic(cn.luischen.utils.IPKit.class);
    java.lang.String mock_result_String9 = "\"127.0.0.1\"";  cn.luischen.utils.MapCache  mock_sub_caller_MapCache8 = PowerMockito.mock(cn.luischen.utils.MapCache.class);
    cn.luischen.model.UserDomain mock_result_UserDomain7 =  JSON.parseObject("{\"activated\":0,\"created\":1490756162,\"email\":\"1034683568@qq.com\",\"groupName\":\"visitor\",\"logged\":0,\"password\":\"a66abb5684c45962d887564f08346e8d\",\"screenName\":\"admin\",\"uid\":1,\"username\":\"admin\"}",cn.luischen.model.UserDomain.class);  javax.servlet.http.HttpSession  mock_sub_caller_HttpSession4 = PowerMockito.mock(javax.servlet.http.HttpSession.class);
    String Stringmock4_0 = "login_user";
    Object Objectmock4_1 = "{\"uid\":1,\"groupName\":\"visitor\",\"password\":\"a66abb5684c45962d887564f08346e8d\",\"logged\":0,\"created\":1490756162,\"screenName\":\"admin\",\"email\":\"1034683568@qq.com\",\"activated\":0,\"username\":\"admin\"}";  cn.luischen.model.UserDomain  mock_sub_caller_UserDomain3 = PowerMockito.mock(cn.luischen.model.UserDomain.class);
    Integer mock_result_Integer3 = 1;
    String Stringmock2_0 = "登录后台";
    String Stringmock2_1 = null;
    String Stringmock2_2 = "127.0.0.1";
    Integer Integermock2_3 = 1;
    PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
    cn.luischen.utils.APIResponse mock_result_APIResponse1 =  JSON.parseObject("{\"code\":\"success\"}",cn.luischen.utils.APIResponse.class);

    PowerMockito.when(cn.luischen.utils.IPKit.getIpAddrByRequest(Mockito.any(javax.servlet.http.HttpServletRequest.class ))).thenReturn( mock_result_String9);
    PowerMockito.doReturn(null).when( mock_sub_caller_MapCache8,"hget",anyString(),anyString());
    PowerMockito.when(mock_UserService.login(anyString(),anyString())).thenReturn( mock_result_UserDomain7);
    PowerMockito.doNothing().when( mock_sub_caller_HttpSession4).setAttribute(anyString(),anyObject());
    PowerMockito.when( mock_sub_caller_UserDomain3.getUid()).thenReturn( mock_result_Integer3);
    PowerMockito.doNothing().when(mock_LogService).addLog(anyString(),Mockito.any(),anyString(),Mockito.anyInt());
    PowerMockito.when(cn.luischen.utils.APIResponse.success()).thenReturn( mock_result_APIResponse1);

    cn.luischen.utils.APIResponse  unitspirit_result =  unitspirit_fixture.toLogin(HttpServletRequest_p_0,HttpServletResponse_p_1,String_p_2,String_p_3,String_p_4);
    cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(result_expected,cn.luischen.utils.APIResponse.class);
    UnitAssert.assertEquals(UnitSpiritFastJsonUtil.getJsonString2(obj_expected),UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
  }
  /**
  * @date 2021-12-08 11:01:14
  * @see cn.luischen.controller.admin.AuthController#toLogin
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_toLogin_1214_120434_222_2_01() throws Throwable {
    //被测函数参数定义
    javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito.mock(javax.servlet.http.HttpServletRequest.class);
    javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito.mock(javax.servlet.http.HttpServletResponse.class);
    String String_p_2 = "admin";
    String String_p_3 = "123456";
    String String_p_4 = null;
  //成员变量设置


    //返回值定义 
    String result_expected = "{\"code\":\"success\"}";

    PowerMockito.mockStatic(cn.luischen.utils.IPKit.class);
    java.lang.String mock_result_String6 = "\"127.0.0.1\"";  cn.luischen.utils.MapCache  mock_sub_caller_MapCache5 = PowerMockito.mock(cn.luischen.utils.MapCache.class);
    cn.luischen.model.UserDomain mock_result_UserDomain4 =  JSON.parseObject("{\"activated\":0,\"created\":1490756162,\"email\":\"1034683568@qq.com\",\"groupName\":\"visitor\",\"logged\":0,\"password\":\"a66abb5684c45962d887564f08346e8d\",\"screenName\":\"admin\",\"uid\":1,\"username\":\"admin\"}",cn.luischen.model.UserDomain.class);  cn.luischen.model.UserDomain  mock_sub_caller_UserDomain3 = PowerMockito.mock(cn.luischen.model.UserDomain.class);
    Integer mock_result_Integer3 = 1;   mock_result_UserDomain4 =  mock_sub_caller_UserDomain3;
    String Stringmock2_0 = "登录后台";
    String Stringmock2_1 = null;
    String Stringmock2_2 = "127.0.0.1";
    Integer Integermock2_3 = 1;
    PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
    cn.luischen.utils.APIResponse mock_result_APIResponse1 =  JSON.parseObject("{\"code\":\"success\"}",cn.luischen.utils.APIResponse.class);

    PowerMockito.when(cn.luischen.utils.IPKit.getIpAddrByRequest(Mockito.any(javax.servlet.http.HttpServletRequest.class ))).thenReturn( mock_result_String6);
    PowerMockito.doReturn(null).when( mock_sub_caller_MapCache5,"hget",anyString(),anyString());
    PowerMockito.when(mock_UserService.login(anyString(),anyString())).thenReturn( mock_result_UserDomain4);
    PowerMockito.when( mock_sub_caller_UserDomain3.getUid()).thenReturn( mock_result_Integer3);
    PowerMockito.doNothing().when(mock_LogService).addLog(anyString(),Mockito.any(),anyString(),Mockito.anyInt());
    PowerMockito.when(cn.luischen.utils.APIResponse.success()).thenReturn( mock_result_APIResponse1);

    cn.luischen.utils.APIResponse  unitspirit_result =  unitspirit_fixture.toLogin(HttpServletRequest_p_0,HttpServletResponse_p_1,String_p_2,String_p_3,String_p_4);
    cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(result_expected,cn.luischen.utils.APIResponse.class);
    UnitAssert.assertEquals(UnitSpiritFastJsonUtil.getJsonString2(obj_expected),UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
  }
  /**
  * @date 2021-12-08 11:01:14
  * @see cn.luischen.controller.admin.AuthController#toLogin
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_toLogin_20210609_175416_472_2_02() throws Throwable {
    //被测函数参数定义
    javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito.mock(javax.servlet.http.HttpServletRequest.class);
    javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito.mock(javax.servlet.http.HttpServletResponse.class);
    String String_p_2 = "admin";
    String String_p_3 = "123456";
    String String_p_4 = null;
  //成员变量设置


    //返回值定义 
    String result_expected = "{\"code\":\"success\"}";


    PowerMockito.mockStatic(cn.luischen.utils.IPKit.class);
    java.lang.String mock_result_String9 = "\"127.0.0.1\"";  cn.luischen.utils.MapCache  mock_sub_caller_MapCache8 = PowerMockito.mock(cn.luischen.utils.MapCache.class);
    cn.luischen.model.UserDomain mock_result_UserDomain7 =  JSON.parseObject("{\"activated\":0,\"created\":1490756162,\"email\":\"1034683568@qq.com\",\"groupName\":\"visitor\",\"logged\":0,\"password\":\"a66abb5684c45962d887564f08346e8d\",\"screenName\":\"admin\",\"uid\":1,\"username\":\"admin\"}",cn.luischen.model.UserDomain.class);
    javax.servlet.http.HttpSession mock_result_HttpSession6 =  PowerMockito.mock(javax.servlet.http.HttpSession.class);  javax.servlet.http.HttpSession  mock_sub_caller_HttpSession5 = PowerMockito.mock(javax.servlet.http.HttpSession.class);
    String Stringmock5_0 = "login_user";
    Object Objectmock5_1 = "{\"uid\":1,\"groupName\":\"visitor\",\"password\":\"a66abb5684c45962d887564f08346e8d\",\"logged\":0,\"created\":1490756162,\"screenName\":\"admin\",\"email\":\"1034683568@qq.com\",\"activated\":0,\"username\":\"admin\"}";   mock_result_HttpSession6 =  mock_sub_caller_HttpSession5;
    String mock_result_String4 = "\"127.0.0.1\"";  cn.luischen.model.UserDomain  mock_sub_caller_UserDomain3 = PowerMockito.mock(cn.luischen.model.UserDomain.class);
    Integer mock_result_Integer3 = 1;
    String Stringmock2_0 = "登录后台";
    String Stringmock2_1 = null;
    String Stringmock2_2 = "127.0.0.1";
    Integer Integermock2_3 = 1;
    PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
    cn.luischen.utils.APIResponse mock_result_APIResponse1 =  JSON.parseObject("{\"code\":\"success\"}",cn.luischen.utils.APIResponse.class);

    PowerMockito.when(cn.luischen.utils.IPKit.getIpAddrByRequest(Mockito.any(javax.servlet.http.HttpServletRequest.class ))).thenReturn( mock_result_String9);
    PowerMockito.doReturn(null).when( mock_sub_caller_MapCache8,"hget",anyString(),anyString());
    PowerMockito.when(mock_UserService.login(anyString(),anyString())).thenReturn( mock_result_UserDomain7);
    PowerMockito.when(HttpServletRequest_p_0.getSession()).thenReturn( mock_result_HttpSession6);
    PowerMockito.doNothing().when( mock_sub_caller_HttpSession5).setAttribute(anyString(),anyObject());
    PowerMockito.when(HttpServletRequest_p_0.getRemoteAddr()).thenReturn( mock_result_String4);
    PowerMockito.when( mock_sub_caller_UserDomain3.getUid()).thenReturn( mock_result_Integer3);
    PowerMockito.doNothing().when(mock_LogService).addLog(anyString(),Mockito.any(),anyString(),Mockito.anyInt());
    PowerMockito.when(cn.luischen.utils.APIResponse.success()).thenReturn( mock_result_APIResponse1);

    cn.luischen.utils.APIResponse  unitspirit_result =  unitspirit_fixture.toLogin(HttpServletRequest_p_0,HttpServletResponse_p_1,String_p_2,String_p_3,String_p_4);
    cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(result_expected,cn.luischen.utils.APIResponse.class);
    UnitAssert.assertEquals(UnitSpiritFastJsonUtil.getJsonString2(obj_expected),UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
  }
  /**
  * @date 2021-12-08 11:01:14
  * @see cn.luischen.controller.admin.AuthController#toLogin
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_toLogin_20210609_175416_472_2_01() throws Throwable {
    //被测函数参数定义
    javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito.mock(javax.servlet.http.HttpServletRequest.class);
    javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito.mock(javax.servlet.http.HttpServletResponse.class);
    String String_p_2 = "admin";
    String String_p_3 = "123456";
    String String_p_4 = null;
  //成员变量设置


    //返回值定义 
    String result_expected = "{\"code\":\"success\"}";

    PowerMockito.mockStatic(cn.luischen.utils.IPKit.class);
    java.lang.String mock_result_String9 = "\"127.0.0.1\"";  cn.luischen.utils.MapCache  mock_sub_caller_MapCache8 = PowerMockito.mock(cn.luischen.utils.MapCache.class);
    cn.luischen.model.UserDomain mock_result_UserDomain7 =  JSON.parseObject("{\"activated\":0,\"created\":1490756162,\"email\":\"1034683568@qq.com\",\"groupName\":\"visitor\",\"logged\":0,\"password\":\"a66abb5684c45962d887564f08346e8d\",\"screenName\":\"admin\",\"uid\":1,\"username\":\"admin\"}",cn.luischen.model.UserDomain.class);
    javax.servlet.http.HttpSession mock_result_HttpSession6 =  PowerMockito.mock(javax.servlet.http.HttpSession.class);  javax.servlet.http.HttpSession  mock_sub_caller_HttpSession5 = PowerMockito.mock(javax.servlet.http.HttpSession.class);
    String Stringmock5_0 = "login_user";
    Object Objectmock5_1 = "{\"uid\":1,\"groupName\":\"visitor\",\"password\":\"a66abb5684c45962d887564f08346e8d\",\"logged\":0,\"created\":1490756162,\"screenName\":\"admin\",\"email\":\"1034683568@qq.com\",\"activated\":0,\"username\":\"admin\"}";   mock_result_HttpSession6 =  mock_sub_caller_HttpSession5;
    String mock_result_String4 = "\"127.0.0.1\"";  cn.luischen.model.UserDomain  mock_sub_caller_UserDomain3 = PowerMockito.mock(cn.luischen.model.UserDomain.class);
    Integer mock_result_Integer3 = 1;
    String Stringmock2_0 = "登录后台";
    String Stringmock2_1 = null;
    String Stringmock2_2 = "127.0.0.1";
    Integer Integermock2_3 = 1;
    PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
    cn.luischen.utils.APIResponse mock_result_APIResponse1 =  JSON.parseObject("{\"code\":\"success\"}",cn.luischen.utils.APIResponse.class);

    PowerMockito.when(cn.luischen.utils.IPKit.getIpAddrByRequest(Mockito.any(javax.servlet.http.HttpServletRequest.class ))).thenReturn( mock_result_String9);
    PowerMockito.doReturn(null).when( mock_sub_caller_MapCache8,"hget",anyString(),anyString());
    PowerMockito.when(mock_UserService.login(anyString(),anyString())).thenReturn( mock_result_UserDomain7);
    PowerMockito.when(HttpServletRequest_p_0.getSession()).thenReturn( mock_result_HttpSession6);
    PowerMockito.doNothing().when( mock_sub_caller_HttpSession5).setAttribute(anyString(),anyObject());
    PowerMockito.when(HttpServletRequest_p_0.getRemoteAddr()).thenReturn( mock_result_String4);
    PowerMockito.when( mock_sub_caller_UserDomain3.getUid()).thenReturn( mock_result_Integer3);
    PowerMockito.doNothing().when(mock_LogService).addLog(anyString(),Mockito.any(),anyString(),Mockito.anyInt());
    PowerMockito.when(cn.luischen.utils.APIResponse.success()).thenReturn( mock_result_APIResponse1);

    cn.luischen.utils.APIResponse  unitspirit_result =  unitspirit_fixture.toLogin(HttpServletRequest_p_0,HttpServletResponse_p_1,String_p_2,String_p_3,String_p_4);
    cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(result_expected,cn.luischen.utils.APIResponse.class);
    UnitAssert.assertEquals(UnitSpiritFastJsonUtil.getJsonString2(obj_expected),UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
  }
  /**
  * @date 2021-12-08 11:01:14
  * @see cn.luischen.controller.admin.AuthController#toLogin
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_toLogin_20211109_110317_805_2_01() throws Throwable {
    //被测函数参数定义
    javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito.mock(javax.servlet.http.HttpServletRequest.class);
    javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito.mock(javax.servlet.http.HttpServletResponse.class);
    String String_p_2 = "admin";
    String String_p_3 = "123456";
    String String_p_4 = null;
  //成员变量设置


    //返回值定义 
    String result_expected = "{\"msg\":\"\",\"code\":\"fail\"}";

    PowerMockito.mockStatic(cn.luischen.utils.IPKit.class);
    java.lang.String mock_result_String5 = "127.0.0.1";  cn.luischen.utils.MapCache  mock_sub_caller_MapCache4 = PowerMockito.mock(cn.luischen.utils.MapCache.class);
    Object mock_result_Object4 = null;
  
    String String_mock3_0 = "admin";
    String String_mock3_1 = "123456";
  cn.luischen.exception.BusinessException sub_UserDomain3 = JSON.parseObject("{\"@type\":\"cn.luischen.exception.BusinessException\",\"errorCode\":\"用户名不存在或密码错误\",\"errorMessageArguments\":[],\"localizedMessage\":\"\",\"message\":\"\"}",cn.luischen.exception.BusinessException.class);
    PowerMockito.doThrow( sub_UserDomain3).when(mock_UserService,"login",anyString(),anyString());
    String Stringmock2_0 = "login_error_count";
    String Stringmock2_1 = "127.0.0.1";
    Object Objectmock2_2 = "1";
    long longmock2_3 = 600L;
    PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
    cn.luischen.utils.APIResponse mock_result_APIResponse1 =  JSON.parseObject("{\"msg\":\"\",\"code\":\"fail\"}",cn.luischen.utils.APIResponse.class);

    PowerMockito.when(cn.luischen.utils.IPKit.getIpAddrByRequest(Mockito.any(javax.servlet.http.HttpServletRequest.class ))).thenReturn( mock_result_String5);
    PowerMockito.when( mock_sub_caller_MapCache4.hget(anyString(),anyString())).thenReturn( mock_result_Object4);
    PowerMockito.doNothing().when( mock_sub_caller_MapCache4).hset(anyString(),anyString(),anyObject(),Mockito.anyLong());
    PowerMockito.when(cn.luischen.utils.APIResponse.fail(anyString())).thenReturn( mock_result_APIResponse1);

    cn.luischen.utils.APIResponse  unitspirit_result =  unitspirit_fixture.toLogin(HttpServletRequest_p_0,HttpServletResponse_p_1,String_p_2,String_p_3,String_p_4);
    cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(result_expected,cn.luischen.utils.APIResponse.class);
    UnitAssert.assertEquals(UnitSpiritFastJsonUtil.getJsonString2(obj_expected),UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
  }
  /**
  * @date 2021-12-08 11:01:14
  * @see cn.luischen.controller.admin.AuthController#toLogin
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_toLogin_20211111_133429_636_2_01() throws Throwable {
    //被测函数参数定义
    javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito.mock(javax.servlet.http.HttpServletRequest.class);
    javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito.mock(javax.servlet.http.HttpServletResponse.class);
    String String_p_2 = "admin";
    String String_p_3 = "123456";
    String String_p_4 = null;
  //成员变量设置


    //返回值定义 
    String result_expected = "{\"msg\":\"\",\"code\":\"fail\"}";

    PowerMockito.mockStatic(cn.luischen.utils.IPKit.class);
    java.lang.String mock_result_String5 = "127.0.0.1";  cn.luischen.utils.MapCache  mock_sub_caller_MapCache4 = PowerMockito.mock(cn.luischen.utils.MapCache.class);
    Integer mock_result_Integer4 = 1;
  
    String String_mock3_0 = "admin";
    String String_mock3_1 = "123456";
  cn.luischen.exception.BusinessException sub_UserDomain3 = JSON.parseObject("{\"@type\":\"cn.luischen.exception.BusinessException\",\"errorCode\":\"用户名不存在或密码错误\",\"errorMessageArguments\":[],\"localizedMessage\":\"\",\"message\":\"\"}",cn.luischen.exception.BusinessException.class);
    PowerMockito.doThrow( sub_UserDomain3).when(mock_UserService,"login",anyString(),anyString());
    String Stringmock2_0 = "login_error_count";
    String Stringmock2_1 = "127.0.0.1";
    Object Objectmock2_2 = "2";
    long longmock2_3 = 600L;
    PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
    cn.luischen.utils.APIResponse mock_result_APIResponse1 =  JSON.parseObject("{\"msg\":\"\",\"code\":\"fail\"}",cn.luischen.utils.APIResponse.class);

    PowerMockito.when(cn.luischen.utils.IPKit.getIpAddrByRequest(Mockito.any(javax.servlet.http.HttpServletRequest.class ))).thenReturn( mock_result_String5);
    PowerMockito.when( mock_sub_caller_MapCache4.hget(anyString(),anyString())).thenReturn( mock_result_Integer4);
    PowerMockito.doNothing().when( mock_sub_caller_MapCache4).hset(anyString(),anyString(),anyObject(),Mockito.anyLong());
    PowerMockito.when(cn.luischen.utils.APIResponse.fail(anyString())).thenReturn( mock_result_APIResponse1);

    cn.luischen.utils.APIResponse  unitspirit_result =  unitspirit_fixture.toLogin(HttpServletRequest_p_0,HttpServletResponse_p_1,String_p_2,String_p_3,String_p_4);
    cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(result_expected,cn.luischen.utils.APIResponse.class);
    UnitAssert.assertEquals(UnitSpiritFastJsonUtil.getJsonString2(obj_expected),UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
  }
  /**
  * @date 2021-12-08 11:01:14
  * @see cn.luischen.controller.admin.AuthController#toLogin
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_toLogin_20211111_133509_608_2_01() throws Throwable {
    //被测函数参数定义
    javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito.mock(javax.servlet.http.HttpServletRequest.class);
    javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito.mock(javax.servlet.http.HttpServletResponse.class);
    String String_p_2 = "admin";
    String String_p_3 = "123456";
    String String_p_4 = null;
  //成员变量设置


    //返回值定义 
    String result_expected = "{\"msg\":\"您输入密码已经错误超过3次，请10分钟后尝试\",\"code\":\"fail\"}";

    PowerMockito.mockStatic(cn.luischen.utils.IPKit.class);
    java.lang.String mock_result_String4 = "127.0.0.1";  cn.luischen.utils.MapCache  mock_sub_caller_MapCache3 = PowerMockito.mock(cn.luischen.utils.MapCache.class);
    Integer mock_result_Integer3 = 3;
  
    String String_mock2_0 = "admin";
    String String_mock2_1 = "123456";
  cn.luischen.exception.BusinessException sub_UserDomain2 = JSON.parseObject("{\"@type\":\"cn.luischen.exception.BusinessException\",\"errorCode\":\"用户名不存在或密码错误\",\"errorMessageArguments\":[],\"localizedMessage\":\"\",\"message\":\"\"}",cn.luischen.exception.BusinessException.class);
    PowerMockito.doThrow( sub_UserDomain2).when(mock_UserService,"login",anyString(),anyString());
    PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
    cn.luischen.utils.APIResponse mock_result_APIResponse1 =  JSON.parseObject("{\"msg\":\"您输入密码已经错误超过3次，请10分钟后尝试\",\"code\":\"fail\"}",cn.luischen.utils.APIResponse.class);

    PowerMockito.when(cn.luischen.utils.IPKit.getIpAddrByRequest(Mockito.any(javax.servlet.http.HttpServletRequest.class ))).thenReturn( mock_result_String4);
    PowerMockito.when( mock_sub_caller_MapCache3.hget(anyString(),anyString())).thenReturn( mock_result_Integer3);
    PowerMockito.when(cn.luischen.utils.APIResponse.fail(anyString())).thenReturn( mock_result_APIResponse1);

    cn.luischen.utils.APIResponse  unitspirit_result =  unitspirit_fixture.toLogin(HttpServletRequest_p_0,HttpServletResponse_p_1,String_p_2,String_p_3,String_p_4);
    cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(result_expected,cn.luischen.utils.APIResponse.class);
    UnitAssert.assertEquals(UnitSpiritFastJsonUtil.getJsonString2(obj_expected),UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
  }
  /**
  * @date 2021-12-08 11:01:14
  * @see cn.luischen.controller.admin.AuthController#toLogin
  * @category null  
  * @author UnitSpirit   
  */
  @Test
  public void test_toLogin_20211119_104103_167_2_01() throws Throwable {
    //被测函数参数定义
    javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito.mock(javax.servlet.http.HttpServletRequest.class);
    javax.servlet.http.HttpServletResponse HttpServletResponse_p_1 = Mockito.mock(javax.servlet.http.HttpServletResponse.class);
    String String_p_2 = "admin";
    String String_p_3 = "123456";
    String String_p_4 = null;
  //成员变量设置


    //返回值定义 
    String result_expected = "{\"msg\":\"\",\"code\":\"fail\"}";

    PowerMockito.mockStatic(cn.luischen.utils.IPKit.class);
    java.lang.String mock_result_String5 = "127.0.0.1";  cn.luischen.utils.MapCache  mock_sub_caller_MapCache4 = PowerMockito.mock(cn.luischen.utils.MapCache.class);
    Object mock_result_Object4 = null;
  
    String String_mock3_0 = "admin";
    String String_mock3_1 = "123456";
  cn.luischen.exception.BusinessException sub_UserDomain3 = JSON.parseObject("{\"@type\":\"cn.luischen.exception.BusinessException\",\"errorCode\":\"用户名不存在或密码错误\",\"errorMessageArguments\":[],\"localizedMessage\":\"\",\"message\":\"\"}",cn.luischen.exception.BusinessException.class);
    PowerMockito.doThrow( sub_UserDomain3).when(mock_UserService,"login",anyString(),anyString());
    String Stringmock2_0 = "login_error_count";
    String Stringmock2_1 = "127.0.0.1";
    Object Objectmock2_2 = "1";
    long longmock2_3 = 600L;
    PowerMockito.mockStatic(cn.luischen.utils.APIResponse.class);
    cn.luischen.utils.APIResponse mock_result_APIResponse1 =  JSON.parseObject("{\"msg\":\"\",\"code\":\"fail\"}",cn.luischen.utils.APIResponse.class);

    PowerMockito.when(cn.luischen.utils.IPKit.getIpAddrByRequest(Mockito.any(javax.servlet.http.HttpServletRequest.class ))).thenReturn( mock_result_String5);
    PowerMockito.when( mock_sub_caller_MapCache4.hget(anyString(),anyString())).thenReturn( mock_result_Object4);
    PowerMockito.doNothing().when( mock_sub_caller_MapCache4).hset(anyString(),anyString(),anyObject(),Mockito.anyLong());
    PowerMockito.when(cn.luischen.utils.APIResponse.fail(anyString())).thenReturn( mock_result_APIResponse1);

    cn.luischen.utils.APIResponse  unitspirit_result =  unitspirit_fixture.toLogin(HttpServletRequest_p_0,HttpServletResponse_p_1,String_p_2,String_p_3,String_p_4);
    cn.luischen.utils.APIResponse obj_expected = JSON.parseObject(result_expected,cn.luischen.utils.APIResponse.class);
    UnitAssert.assertEquals(UnitSpiritFastJsonUtil.getJsonString2(obj_expected),UnitSpiritFastJsonUtil.getJsonString2(unitspirit_result));
  }
}